#include <graphics/rect.h>

namespace yam3d
{
namespace graphics
{

Rect::Rect()
    : core::Object(__FUNCTION__)
    , m_start(0,0)
    , m_size(0,0)
{
}


Rect::Rect(float startX, float startY, float sizeX, float sizeY )
    : core::Object(__FUNCTION__)
    , m_start(startX,startY)
    , m_size(sizeX,sizeY)
{
}


Rect::Rect( const math::vec2& start, const math::vec2& size )
    : core::Object(__FUNCTION__)
    , m_start(start)
    , m_size(size)
{
}


Rect::Rect(const Rect& o)
    : core::Object(__FUNCTION__)
    , m_start(o.m_start)
    , m_size(o.m_size)
{
}


Rect& Rect::operator=(const Rect& o)
{
    if( this != &o )
    {
        m_start = o.m_start;
        m_size = o.m_size;
    }

    return *this;
}


Rect::~Rect()
{
}


void Rect::setStart( const math::vec2& start )
{
    m_start = start;
}


void Rect::setSize( const math::vec2& size )
{
    m_size = size;
}


const math::vec2& Rect::getStart() const
{
    return m_start;
}


const math::vec2& Rect::getSize() const
{
    return m_size;
}


}
}


